package com.example.xksys.mapper;

import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;
@Repository("adminOperationMapper")
@Mapper
public interface AdminOperationMapper {
    @Select("select count(*) from admin where adminName= #{adminName} and adminPwd=#{adminPwd}")
Integer AdminLogin(Map<String,String> mp);
    @Insert("Insert into course values(null,#{cName},#{cKey},#{cTeacher},#{cMinNum},0,#{cMaxNum})")
    Integer InsertCourse(Map<String,String> map);
    @Delete("delete from course　where cKey=#{cKey}")
    Integer deleteCourseById(Map<String,String>mp);
    List<Map<String,Object>> selectCourseByTrim(Map<String,Object>mp);
    Integer deleteCourseByKey(Map<String,String>map);
    Integer deleteXkByCKey(Map<String,String>map);
    Integer updateCourseByKey(Map<String,String>map);
}
